<template>
  <div>
    <h1>App</h1>

    <!-- 管道符 -->
    {{ name | upfirst | split('-') }}
    <hr>
    {{ name | split | join(',') }}
    <hr>
    {{ upfirst(name) }}
  </div>
</template>
<script>
export default {
  filters: {
    join(value = [], sp = '') {
      return value.join(sp);
    }
  },
  data() {
    return {
      name: 'ja-ck',
    };
  },
  methods: {
    upfirst: function (value) {
      return value[0].toUpperCase() + value.slice(1);
    }
  }
};
</script>
<style>
div {
  border: solid;
  padding: 10px;
}
</style>